<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Restoring TiDB Backup Resources">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="TiDB_00041.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20241029">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="TiDB_00044">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Restoring TiDB Backup Resources</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="TiDB_00044"></a><a name="TiDB_00044"></a>
  <h1 class="topictitle1">Restoring TiDB Backup Resources</h1>
  <div>
   <p>This section describes how to restore a TiDB backup resource that has been backed up to the original or a new location.</p>
   <div class="section">
    <h4 class="sectiontitle">Context</h4>
    <p>Backup copies, replication copies, or imported copies can be used for restoration. Restoration to the original location or a new location is supported. Note that replication copies cannot be used for restoration to the original location.</p>
   </div>
   <div class="section" id="TiDB_00044__section1756842892313">
    <h4 class="sectiontitle">Prerequisites</h4>
    <ul id="TiDB_00044__ul132661420141115">
     <li id="TiDB_00044__li762383391617">Before the restoration, ensure that the restoration target location is correct.</li>
     <li id="TiDB_00044__li7712113644310">Before the restoration, ensure that the remaining space of the data directory at the target location for restoration is greater than the size of the copy used for restoration before reduction.</li>
     <li id="TiDB_00044__li5441111618120">Before executing the restoration job, disable the TiDB log backup function. After the restoration job is complete, enable the function again. For details about how to enable and disable the function, see <a href="TIDB_00072.html">Function Overview</a>.</li>
     <li id="TiDB_00044__li16230658087">The clock source configuration of clusters must be the same.</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Procedure</h4>
    <ol>
     <li><span>Choose <span class="uicontrol" id="TiDB_00044__tidb_00040_en-us_topic_0000001839142377_uicontrol548619473589"><b><span id="TiDB_00044__tidb_00040_en-us_topic_0000001839142377_text44861447115812"><strong>Explore</strong></span> &gt; <span id="TiDB_00044__tidb_00040_en-us_topic_0000001839142377_text2048614765813"><strong>Copy Data</strong></span> &gt; <span id="TiDB_00044__tidb_00040_en-us_topic_0000001839142377_text163101122194918"><strong>Databases</strong></span> &gt; TiDB</b></span>.</span></li>
     <li><span>You can search for copies by TiDB backup resource or copy. This section describes how to search for copies by resource.</span><p></p><p>On the <strong>Resources</strong> tab page, locate the backup resource to be restored based on the backup resource name and click the backup resource name.</p> <p></p></li>
     <li><span>Click the <span class="uicontrol"><b><span><strong>Copy Data</strong></span></b></span> tab and select the year, month, and day in sequence to locate the copy.</span><p></p><p>If <span><img src="en-us_image_0000001792504822.png"></span> is displayed below a month or day, copies exist in the month or on the day.</p> <p></p></li>
     <li><span>Specify a copy or point in time for restoration.</span><p></p>
      <div class="p">
       You can either restore data to a specified point in time or using a specific copy.
       <ol type="a">
        <li>Restoring data to a specified point in time or using a specific copy
         <ul>
          <li>Restoring data using a specific copy<p><span><img class="eddx" src="en-us_image_0000001792504830.png"></span></p></li>
          <li>Restoring data to a specified point in time<p><span><img class="eddx" src="en-us_image_0000001839224165.png"></span></p> <p></p> <p>Data can be restored to the specific time point in the blue part on the timeline. <span><img src="en-us_image_0000001839144209.png"></span> indicates that a copy exists at the time point. If no logs are backed up at a time point, data cannot be restored to the time point.</p>
           <div class="note">
            <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
            <div class="notebody">
             <ul id="TiDB_00044__oracle_gud_0058_ul75802612312">
              <li id="TiDB_00044__oracle_gud_0058_li1497342618234">For 1.5.0, a maximum of 100 copies can be displayed on the timeline. You can click <span><img id="TiDB_00044__oracle_gud_0058_image173544102299" src="en-us_image_0000001886153709.png"></span> to view all copies.</li>
              <li id="TiDB_00044__oracle_gud_0058_li95818264231">During point-in-time recovery, the information about the copy used for restoration cannot be obtained on the management page. Therefore, users cannot view the copy information of the restoration job on pages of the restoration job and related events.</li>
             </ul>
            </div>
           </div></li>
         </ul></li>
        <li>Restoring the TiDB backup resource to the original or a new location
         <div class="p">
          <a href="#TiDB_00044__table194961441141219">Table 1</a> describes the related parameters. 
          <div class="tablenoborder">
           <a name="TiDB_00044__table194961441141219"></a><a name="table194961441141219"></a>
           <table cellpadding="4" cellspacing="0" summary="" id="TiDB_00044__table194961441141219" frame="border" border="1" rules="all">
            <caption>
             <b>Table 1 </b>Restoring TiDB namespaces or table sets
            </caption>
            <colgroup>
             <col style="width:32.019999999999996%">
             <col style="width:67.97999999999999%">
            </colgroup>
            <thead align="left">
             <tr>
              <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.1"><p>Parameter</p></th>
              <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.2"><p>Description</p></th>
             </tr>
            </thead>
            <tbody>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.1 "><p><span><strong>Restore To</strong></span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.2 "><p>Select either <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> or <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p></td>
             </tr>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.1 "><p><span><strong>Target Cluster</strong></span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.2 "><p>If you choose to restore to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>, choose the target TiDB cluster.</p>
               <div class="note">
                <span class="notetitle"> NOTE: </span>
                <div class="notebody">
                 <ul>
                  <li>The target database will be deleted during log restoration.</li>
                  <li id="TiDB_00044__li1699515214016">Restoring data from a database of a later version to a database of an earlier version may fail. Query TiDB official documents to check whether the database version is compatible.</li>
                 </ul>
                </div>
               </div></td>
             </tr>
             <tr>
              <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.1 "><p><span><strong>Delete Same-Name Table</strong></span></p></td>
              <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.4.2.1.1.2.1.2.2.3.1.2 "><p>Use this parameter to decide whether to delete tables with the same names. When this option is enabled during full copy restoration, the ProtectAgent host deletes tables with the same names in the target location and in the original copy by default.</p>
               <div class="note" id="TiDB_00044__note571410144371">
                <span class="notetitle"> NOTE: </span>
                <div class="notebody">
                 <p id="TiDB_00044__p147141414193715">If you do not delete tables with the same names, the restoration will fail. Exercise caution when performing this operation.</p>
                </div>
               </div></td>
             </tr>
            </tbody>
           </table>
          </div>
         </div></li>
        <li>Click <span class="uicontrol"><b>OK</b></span>.</li>
       </ol>
      </div> <p></p></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="TiDB_00041.html">Restoration</a>
    </div>
   </div>
  </div>
 </body>
</html>